<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <title>WebChat</title>

 	    <script type="text/javascript" src="chatjs/jquery-1.11.1.js" ></script>
		<script type='text/javascript' src='chatjs/jquery.cookie.js'></script> 
		<script type='text/javascript' src='chatjs/strophe_hx.js'></script> 
		<script src="chatjs/easemob.im-1.0.7.js"></script>
		 <script type='text/javascript' src='chatjs/chat.js'></script>
		
		
<!-- 页面以及业务相关的代码 -->
<script type="text/javascript">
var chat_contextPath= "Strophe";
//初始化通信服务 begin
var BOSH_SERVER = 'http://172.16.2.141:7070/http-bind/';
//var BOSH_SERVER = 'http://172.16.2.140:7171/http-bind/';
var domain = 'jsvlepnode';
var initChatParam = {};
initChatParam.bosh_server = BOSH_SERVER; //bosh服务
initChatParam.domain = domain; //domain域
initChatParam.usercount = "0000000008"; //登录帐号
initChatParam.u_nickname = ""; //用户显示名称
initChatParam.u_imageurl=""; //用户显示头像
initChatParam.chat_contextPath = chat_contextPath; //上下文路径
initChatParam.chat_im_images_url=""; //企信文件服务地址
initChatParam.chat_im_download = "" ;//企信文件下载地址
var chatObject   = new chat(initChatParam);
$(function(){
	//chatObject.prototy.loaderr_img(imgobject,chatObject.sessionType.chat)
	//alert(chatObject);
	chatObject.onConnect(); // 连接
	//初始化通信服务 end
});
</script>	 
    </head>
    <body>
        <div id='login' style='text-align: center'>
            <form name='cred'>
                <label for='jid'>JID:</label>
                <input type='text' id='jid' />
                <label for='pass'>Password:</label>
                <input type='password' value="jsepc1!" id='pass' />
                <input type='button' id='connect' value='connect' />
            </form>
        </div>
        <hr>
            <table style="width:100%;">
                <tr>
                    <td style="width:70%;">
                        <input type="hidden" id="fromjid" />
                        <input type="input" id="tojid" /> - to jid <br>
                        <textarea id="msg" cols="50" rows="5"></textarea> - message<br>
                        <input id="send" type="button" value="send" />
                    </td>
                    <td style="vertical-align:top;">
                        <span>联系人</span>
                        <div>
                            <ul id="friendlist">
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>
        <hr>
        <div id='log'></div>
    </body>
</html>
